home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 4
/
Gold Medal Software - Volume 4 (Gold Medal) (1994).iso
/
menuts
/
hdmm468.arj
/
CZIP.BAT
< prev
next >
Wrap
DOS Batch File
|
1993-09-21
|
3KB
|
127 lines
ECHO OFF
CLS
C:
IF EXIST \TEMPZIPC\PRN GOTO :EXIT2
IF %1. == . GOTO :HELP
IF %1. == 1. GOTO :OK
IF %1. == 2. GOTO :OK
IF %1. == 3. GOTO :OK
IF %1. == 4. GOTO :OK
GOTO :HELP
:OK
SET DRIVE=%2
IF EXIST %3NUL SET DRIVE=%3
IF EXIST %2%3NUL SET DRIVE=%2%3
IF %4. == FILE. IF NOT EXIST %3 GOTO :HELP
IF %4. == FILE. GOTO :OK2
IF NOT EXIST %DRIVE%NUL GOTO :HELP
:OK2
IF NOT EXIST \TEMP\PRN MD \TEMP
MD\TEMPZIPC
CD\TEMPZIPC
IF %4. == FILE. GOTO :FILEOK
%2
CD %DRIVE%.
PCOPY @C:\MENU\CZIP.LST C:\TEMPZIPC /X /EQ
GOTO :NOFILE
:FILEOK
PCOPY %3 C:\TEMPZIPC /X /EQ
:NOFILE
C:
CD \TEMPZIPC
IF EXIST \MENU\PRE.BAT CALL \MENU\PRE.BAT
IF %1. == 1. GOTO :ZZAP
IF %1. == 2. GOTO :TS
IF %1. == 3. GOTO :SHEZ
IF %1. == 4. GOTO :ZIPCVT
GOTO :EXIT
:ZZAP
SET ZZAPLOG=C:\TEMP\ZZAP.LOG
SET PKTMP=C:
ZZAP *.ZIP *.ARJ *.PAK *.LZH *.ARC *.SDN /EZIP /N /B /L
IF EXIST *.Z!P GOTO :ERROR
IF ERRORLEVEL 1 GOTO :ERROR
GOTO :EXIT
:TS
IF EXIST C:\SECURITY\TSCZIP.CFG SET TSCFG=C:\SECURITY\TSCZIP.CFG
SET PKTMP=C:
TS *.*
IF ERRORLEVEL 1 GOTO :ERROR
GOTO :EXIT
:SHEZ
SET SHEZLOG=C:\TEMP\SHEZ.LOG
SET PKTMP=C:
SHEZ *.ZIP /PLAY=C:\SECURITY\SHEZCV.MAC
IF ERRORLEVEL 1 GOTO :ERROR
GOTO :EXIT
:ZIPCVT
SET PKTMP=C:
ZIPCVT *.ZIP
IF ERRORLEVEL 1 GOTO :ERROR
GOTO :EXIT
:ERROR
ECHO -
ECHO The errorlevel indicates an error occured during the conversion.
ECHO I will try to load SHEZ to correct the error.
PAUSE
SHEZ *.*
GOTO :EXIT
:HELP
ECHO CZIP.BAT is designed to help convert from PKZIP 1.1 to 2.04.
ECHO The CZIP program requires three parameters <fourth is optional>
ECHO CZIP 1-4 fromdrive: \fromdir\ <FILE>
ECHO The 1-4 stands for the conversion program:
ECHO 1 ZZAP
ECHO 2 TranScan
ECHO 3 SHEZ
ECHO 4 ZipCvt
ECHO The fromdrive: must include only the source drive letter and a colon.
ECHO The \fromdir\ MUST include the source directory starting with \ and
ECHO MUST include a trailing \.
ECHO If you wish to specify one file replace \fromdir\ with the full
ECHO drive:\dir\filename.ext and type FILE as the fourth parameter.
ECHO -
ECHO Example: To convert all files from C:\TEMP directory using ZZAP type:
ECHO CZIP 1 C: \TEMP\
ECHO -
ECHO Example: To convert a file C:\TEMP\TEST.ZIP using ZZAP type:
ECHO CZIP 1 C: \TEMP\TEST.ZIP FILE
ECHO -
ECHO This batch file requires access to PCOPY, PKZIP, PKUNZIP and the
ECHO conversion program of your choice: ZZAP, TS, SHEZ or ZIPCVT.
PAUSE
GOTO :EXIT2
:EXIT
IF EXIST \TEMPZIPC\PRN CD \TEMPZIPC
IF EXIST *.ZIP PKUNZIP * -T
IF ERRORLEVEL 1 GOTO :ERROR
C:
CD \TEMPZIPC
IF %4. == FILE. PCOPY *.* %3 /X /EQ
IF NOT %4. == FILE. PCOPY @C:\MENU\CZIP.LST %DRIVE% /X /EQ
:EXIT2
CD\
IF EXIST \TEMPZIPC\PRN IF NOT EXIST \TEMPZIPC\*.* RD \TEMPZIPC
IF NOT EXIST \TEMPZIPC\PRN GOTO :EXIT3
ECHO I could not remove the directory!
PAUSE
:EXIT3
SET PKTMP=
SET ZZAPLOG=
SET TSCFG=
SET SHEZLOG=
SET DRIVE=